package com.wuxiaolong.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class TestGatewayApplication {

	public static void main(String[] args) {
		SpringApplication.run(TestGatewayApplication.class, args);
	}

//	@Bean
//	public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
//		return builder.routes()
//				/**
//				 * 以/test/**开头的请求的转发   如http://gatewayDomain/test/**  赚到  http://localhost:8081/test/**
//				 */
//				.route("my-test-1", r -> r.path("/test/**")
//						.uri("http://localhost:8081"))
//
//	}

}
